mod arrays;
mod funcs;
mod types;

pub use arrays::{extend_curve_array_map, CURVE_ARRAY_MAP};
pub use funcs::{
    CURVE_FUNC_MAP, EASE_IN_BACK, EASE_IN_BOUNCE, EASE_IN_CUBIC, EASE_IN_ELASTIC, EASE_IN_QUAD,
    EASE_IN_QUART, EASE_IN_QUINT, LINEAR,
};
pub use types::*;

pub fn get_frame_state_progress(ease_curve: &EaseCurve, frame_num: f64) -> Vec<f64> {
    match ease_curve {
        EaseCurve::Segment(s) => arrays::get_frame_state_progress_by_curve_transition(s, frame_num),
        EaseCurve::FuncHashMap(name) => {
            funcs::get_frame_state_progress_by_funcs_map(name, frame_num)
        }

        EaseCurve::ArrayHashMap(name) => {
            arrays::get_frame_state_progress_by_curve_string(name, frame_num)
        }
    }
}
